home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1997 May & June / Amiga-CD 1997 #5-6.iso / grafik / wildfire / wildfirefpu / macros / pictureinfo.rexx < prev    next >
OS/2 REXX Batch file  |  1997-03-07  |  932b  |  44 lines

  1. /*
  2. ------------------------------------------------------------
  3.  pictureInfo.rexx
  4.  
  5.  This script demonstrates the ARexx-pictureInfo-command.
  6.  
  7.  Copyright ©1996 WK-Artworks
  8. ------------------------------------------------------------
  9. */
  10.  
  11. if ~show('P','Wildfire') then do
  12.  say " Error: The Wildfire-program must be started before executing this script."
  13.  exit
  14. end
  15.  
  16. ch1='22'x
  17. address 'Wildfire'
  18. options results
  19. t_getpicdrawer
  20. preset=result
  21. t_getfile preset
  22. fn=result
  23. if fn="" then exit
  24. t_pictureinfo fn
  25.  
  26. t_getwidth
  27. width=result
  28. t_getheight
  29. height=result
  30. t_getdepth
  31. depth=result
  32.  
  33. if ~open(script,"t:wf.tmp",'W') then do
  34. /*  message "Error: Couldn't open script"*/
  35.   exit
  36. end
  37. call writeln(script,"The selected picture")
  38. call writeln(script,ch1 || fn || ch1)
  39. call writeln(script,"has a resolution of " || width || "x" || height || "x" || depth || ".")
  40. call close(script)
  41. txt_text "t:wf.tmp"
  42. txt_wait
  43. address command "delete >NIL: t:wf.tmp"
  44.